package com.lw.common.utils

import android.content.Context
import android.content.res.Configuration

/**
 * @description:判断是否暗色模式
 * @author: yuan
 * @date: 2023/3/2/0002
 */
object UIModeUtil {
    fun isNightMode(context: Context): Boolean {
        val uiMode = context.resources.configuration.uiMode
        return uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
    }
}